home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / graphics / qrt.lzh / LANGUAGE.DOC < prev    next >
Text File  |  1989-02-16  |  35KB  |  1,453 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.         
  8.         
  9.         
  10.                              QRT Language Reference
  11.         
  12.         
  13.         INTRODUCTION
  14.         
  15.         This document is a reference  guide  to the QRT command language.
  16.         One section is devoted to each  QRT  command.   All parameters to
  17.         commands are listed.
  18.         
  19.         More information on QRT can  be  found  in  the User's Manual and
  20.         Technical Reference Manual.
  21.         
  22.         
  23.         The following table lists syntax used in this document:
  24.         
  25.             TEXT       MEANING              EXAMPLE             RANGE
  26.         
  27.             (x,y,z)    floating pt vector   (10, -20, 30.56)    all
  28.         
  29.             (r,g,b)    color value triple   (0, .5, 1.00)       0 to 1
  30.         
  31.             i          an integer           12                  0 to 127
  32.         
  33.             n          floating pt number   -123.4              all
  34.         
  35.             p          positive float       123.4               >0
  36.         
  37.             string     text string          FOO_BAR             ASCII
  38.         
  39.         
  40.         Each  section  of  this  document  contains  one  or  more of the
  41.         following sub-sections:
  42.         
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.         QRT Ray Tracer               Page 1            Language Reference
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.         
  74.           Command Type          :  OPTIONAL or REQUIRED
  75.         
  76.           Parameters (required) :  Lists required parameters
  77.           Parameters (optional) :  Lists optional parameters
  78.         
  79.           Optional Forms        :  Alternatives for parameter names. Ex:
  80.                                    'horiz' = 'horizon' means either can
  81.                                    be used as a parameter name.
  82.         
  83.           Example               :  An example of the command (with all
  84.                                    required parameters, but not
  85.                                    necessarily all optional ones.
  86.         
  87.           Restrictions          :  Things not to do
  88.         
  89.           See also              :  Similar commands
  90.         
  91.         
  92.         QRT has a free format input language, and parameters can be given
  93.         in any order.
  94.         
  95.         
  96.         
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.         QRT Ray Tracer               Page 2            Language Reference
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.         
  140.                             QRT Misc. Setup Commands
  141.         
  142.         
  143.         SKY:
  144.            
  145.            Command type: OPTIONAL
  146.            
  147.            The SKY command is used to specify  the color of all rays that
  148.            don't hit any other object.  The sky is black by default.  The
  149.            sky color at the zenith (up),  and  horizon  can be specified,
  150.            and QRT will  blend  the  colors  in  between  as  smoothly as
  151.            possible.  In addition, dithering can be specified.
  152.            
  153.            Parameters (optional):
  154.            
  155.                zenith = (r,g,b)        : the color of the zenith
  156.                horiz  = (r,g,b)        : the color at the horizon
  157.                dither = i              : dithering
  158.            
  159.            Optional forms:
  160.            
  161.                'horiz' = 'horizon'
  162.            
  163.            Example:
  164.            
  165.                SKY (  horiz  = (0, 0, .6),
  166.                       zenith = (0, 0, .4),
  167.                       dither = 5
  168.                    )
  169.            
  170.            See also : GROUND
  171.            
  172.            
  173.         GROUND:
  174.         
  175.            Command type: OPTIONAL
  176.            
  177.            QRT does not have a specific  ground  command.  Instead, use a
  178.            large parallelogram with an optional pattern.
  179.            
  180.                PARALLELOGRAM (  loc = (-10000, 0, -10000),
  181.                                  v1  = ( 20000, 0,      0),
  182.                                  v2  = ( 0,     0,  20000),
  183.            
  184.                                  pattern = PATTERN_OF_CHOICE
  185.                               )
  186.            
  187.            See also : PARALLELOGRAM
  188.            
  189.  
  190.  
  191.  
  192.         QRT Ray Tracer               Page 3            Language Reference
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.         FOC_LENGTH:
  206.            
  207.            Command type: OPTIONAL
  208.            
  209.            This sets the focal length of QRT's  "camera".  The default is
  210.            50, but it can be  changed  with  this  command.  As with 35mm
  211.            photography, larger numbers  result  in  a 'telephoto' effect,
  212.            and smaller numbers will result  in wide angle (and distorted)
  213.            views.
  214.            
  215.            Example:
  216.            
  217.                FOC_LENGTH = 70
  218.            
  219.            Restrictions:
  220.            
  221.                0 < FOC_LENGTH
  222.            
  223.            
  224.         FIRST_SCAN:
  225.            
  226.            Command type: OPTIONAL
  227.            
  228.            By default, QRT generates an image with the same resolution as
  229.            your screen.   However,  it  can  be  instructed  to  create a
  230.            partial image  by  using  this  command  and  LAST_SCAN.  This
  231.            feature may  not  be  supported,  depending  on  your QRT post
  232.            processor.  First scan should be less than the Y resolution of
  233.            your screen.
  234.            
  235.            Example:
  236.            
  237.                FIRST_SCAN = 100
  238.            
  239.            Restrictions:
  240.            
  241.                0 < FIRST_SCAN < y-resolution
  242.            
  243.            See also : LAST_SCAN
  244.            
  245.            
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.         QRT Ray Tracer               Page 4            Language Reference
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.            
  272.         LAST_SCAN:
  273.            
  274.            Command type: OPTIONAL
  275.            
  276.            This command is similar  to  FIRST_SCAN.  LAST_SCAN  should be
  277.            less than the Y resolution of your screen.
  278.            
  279.            Example:
  280.            
  281.                LAST_SCAN = 300
  282.            
  283.            Restrictions:
  284.            
  285.                0 < LAST_SCAN < y-resolution
  286.            
  287.            See also : FIRST_SCAN
  288.            
  289.            
  290.         FILE_NAME:
  291.            
  292.            Command type: REQUIRED
  293.            
  294.            This is used to set  the  output  file  for QRT, which will be
  295.            read by the post processor.  The  file  name will be mapped to
  296.            upper case.   Some  restrictions  may   arise from file naming
  297.            conventions on specific computers.
  298.            
  299.                Example:
  300.            
  301.                    FILE_NAME = QRT_IMAGE.RAW
  302.            
  303.            
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.         QRT Ray Tracer               Page 5            Language Reference
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.            
  338.         OBSERVER:
  339.            
  340.            Command type: REQUIRED
  341.            
  342.            OBSERVER tells QRT where  the  observer  is  located,  and his
  343.            direction of view.  The view direction  is specified by giving
  344.            the coordinates he should look at.   In addition, the observer
  345.            UP vector may be given.  This is, by default, (0,1,0).
  346.            
  347.            Parameters (required):
  348.            
  349.                loc     = (x,y,z)           : location of observer
  350.                lookat  = (x,y,z)           : point of interest
  351.            
  352.            Parameters (optional):
  353.            
  354.                up      = (x,y,z)           : up vector
  355.            
  356.            Optional forms:
  357.            
  358.                'loc' = 'pos' = 'location' = 'position'
  359.            
  360.            Example:
  361.            
  362.                OBSERVER ( loc    = (0, 0, 0),
  363.                           lookat = (100, 0, 0)
  364.                         )
  365.            
  366.            Restrictions:
  367.            
  368.                The observer cannot  look  in  the  direction  of  the  up
  369.            vector.
  370.                'lookat' cannot be equal to 'loc'.
  371.                'up' must have non-zero length.
  372.            
  373.            
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.         QRT Ray Tracer               Page 6            Language Reference
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.            
  404.         LAMP:
  405.            
  406.            Command type: OPTIONAL
  407.            
  408.            Lamps are  sources  of  light  in  QRT.   They  can  be placed
  409.            anywhere, and emit any  color  and  intensity  of  light.  The
  410.            ambient light value is the  color  of  the lamp.  The distance
  411.            parameter is the minimum  distance  from the lamp that objects
  412.            will be illuminated at full intensity.  Most objects should